package com.one.controller;


import com.one.entity.Aqi;
import com.one.service.IAqiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Api(tags = "AQI数据接口")
@RequestMapping("/aqi")
public class AqiController {

	@Autowired
	private IAqiService aqiService;

	@ApiOperation(value = "查询所有AQI数据")
	@PostMapping("/listAqiAll")
	public List<Aqi> listAqiAll(){
		log.info("查询所有AQI数据");
		return aqiService.listAqiAll();
	}


}
